home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0195.ZIP / GRFXTABL.LIB < prev    next >
Text File  |  1984-12-04  |  1KB  |  36 lines

  1. {@@@@@@@@@@@ copyright (C) 1984 by Neil J. Rubenking @@@@@@@@@@@@@@@@@@@@@@@@
  2. The purchaser of these procedures and functions may include them in COMPILED
  3. programs freely, but may not sell or give away the source text.
  4.  
  5.    The ROM Graphics table resides at address $F000:$FA6E.
  6.    By defining an array of the right "shape" at that absolute
  7.    address, we have instant access to the table.
  8. }
  9.  
  10.  
  11.  
  12. type
  13.   ROMentry = array[1..8] of byte;
  14. var
  15.   table : array[0..255] of ROMentry absolute $F000:$FA6E;
  16. {@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@}
  17. procedure ShowEntry(entry : ROMentry);
  18. var
  19.   Byt, Bit    : 1..8;
  20.   AByte       : byte;
  21. begin                                 { This procedure is meant to }
  22.     ClrScr;                           { write into the upper left  }
  23.       for Byt := 1 to 8 do            { corner of a window.        }
  24.         begin
  25.         AByte := entry[Byt];
  26.         for bit := 8 downto 1 do
  27.           begin
  28.             if odd(AByte) then
  29.               begin
  30.                 gotoXY(Bit,Byt);
  31.                 write('█');
  32.               end;
  33.             AByte := AByte div 2;
  34.           end;  {for bit}
  35.         end;   {for Byt}
  36. end;